package com.ttg.web.dao;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ttg.common.dto.TagProducer;
import com.ttg.common.enums.BankPublicTradeEnum;
import com.ttg.model.pojo.BankPublicTradePrimitive;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

import java.util.List;

public interface BankPublicTradePrimitiveDao extends IService<BankPublicTradePrimitive> {

    BankPublicTradePrimitive getByMctNoAndDateLast(String mctNo);

    BankPublicTradePrimitive getByMctNoAndTradeEnum(String mctNo, BankPublicTradeEnum bankPublicTradeEnum);

    void truncate();

    List<String> getMctNosByTags(List<TagProducer> tags, String key);

    @Transactional(
            rollbackFor = {Exception.class}
    )
    boolean saveBatchTypeSplit(Map<String, List<BankPublicTradePrimitive>> batMap);
}
